package com.aykls.controller;


import com.aykls.Vo.Enroll;
import com.aykls.Vo.ResultVo;
import com.aykls.entity.Admin;
import com.aykls.service.AdminService;
import com.sun.deploy.net.HttpResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.UUID;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author aykls
 * @since 2022-11-19
 */
@Controller
@RequestMapping("/sys")
public class AdminController {
    @Autowired
    AdminService adminService;
    @PostMapping("/login")
    @ResponseBody
    public ResultVo Login(@RequestParam String mobile, @RequestParam String password){
        ResultVo resultVo = adminService.Login(mobile,password);
        return resultVo;
    }
    @PostMapping("/enroll")
    @ResponseBody
    public ResultVo enroll(@RequestParam Enroll enroll){
        ResultVo resultVo  = adminService.enroll(enroll);
        return resultVo;

    }
}

